﻿<cfsilent>
	<cfscript>
		
		temFile = GetTempDirectory() & createUUID() & ".xls";
		downFile = URLEncodedFormat( "学籍信息录入模板", "utf-8");
		
		excel = getProperty("serviceFactory").getBean("spreadSheetObject");

		/* 创建工作簿 */
		spreadsheetObj = excel.SpreadSheetNew( "学生基础信息", false);		

		/* 添加表头 */
		excel.SpreadsheetAddrow(spreadsheetObj, "学号,护照名,性别,护照号,国籍,中文名,出生日期,入学日期,护照有效期,婚姻状况,家庭住址,在华住址,邮件,电话,经费来源");
		
		
		excel.SpreadSheetWrite(spreadsheetObj, temFile, true);

	</cfscript>

	<cfheader name="Content-Disposition" value="attachment; filename=#downFile#.xls" />
	<cfcontent file="#temFile#" reset="yes" type="application/msexcel" deletefile="yes" />	

</cfsilent>